body {
  background-color: #eee;
}

/* 界面开始 */

.allPage {
  width: 800px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#content {
  position: relative;
  height: 500px;
  border-radius: 5px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 3%), 0 1px 6px -1px rgba(0, 0, 0, 2%),
    0 2px 4px 0 rgba(0, 0, 0, 2%);
  overflow: hidden;
  background-color: #fff;
}

#content .scoreBox {
  position: absolute;
  width: 150px;
  height: 40px;
  left: 10px;
  top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  color: #fff;
  user-select: none;
  z-index: 999;
}

.bottomBtn {
  display: flex;
  margin-top: 10px;
  justify-content: space-between;
}

.bottomBtn button {
  width: 150px;
  height: 40px;
  color: #fff;
  border: unset;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  ;
}

.bottomBtn button:first-child {
  background-color: #67c23a;
}

.bottomBtn button:nth-child(2) {
  width: 480px;
  background-color: #1677ff;
}

.bottomBtn button:nth-child(3) {
  background-color: #ff5b5d;
}

.bottomBtn button:first-child:hover {
  background-color: #7dcd55;
}

.bottomBtn button:nth-child(2):hover {
  background-color: #3d8dfc;
}

.bottomBtn button:nth-child(3):hover {
  background-color: #f97679;
}

.bottomBtn button:first-child:active {
  background-color: #67c23a;
}

.bottomBtn button:nth-child(2):active {
  background-color: #1677ff;
}

.bottomBtn button:nth-child(3):active {
  background-color: #ff4d4f;
}

.inside {
  width: 100%;
}

/* 界面结束 */

/* 玩家开始 */
#player {
  width: 80px;
  height: 80px;
  position: absolute;
  bottom: 800px;
  left: -10px;
  background-color: #666;
}

.enter {
  animation-name: enterAnimation;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes enterAnimation {
  70% {
    height: 70px;
    left: 130px;
    bottom: 100px;
  }

  100% {
    height: 80px;
    left: 130px;
    bottom: 100px;
  }
}

.move {
  animation-name: moveAnimation;
  animation-duration: 0.3s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes moveAnimation {
  0% {
    left: 130px;
    bottom: 100px;
    height: 80px;
  }

  100% {
    left: 130px;
    bottom: 100px;
    height: 70px;
  }
}

.jump {
  animation-name: jumpAnimation;
  animation-duration: 0.4s;
  animation-timing-function: ease;
  animation-iteration-count: 2;
  animation-direction: alternate;
}

@keyframes jumpAnimation {
  0% {
    left: 130px;
    bottom: 100px;
  }

  40% {
    height: 70px;
  }

  100% {
    left: 130px;
    bottom: 360px;
    height: 80px;
  }
}

.dead{
  animation-name: deadkAnimation;
  animation-duration: 0.8s;
  animation-timing-function: linear;
}

@keyframes deadkAnimation {
  0%{
    left: 130px;
    bottom: 100px;
  }
  100% {
    left: -100px;
    bottom: 100px;
  }
}

/* 玩家结束 */

/* 障碍开始 */
#block {
  position: absolute;
  width: 80px;
  height: 120px;
  position: absolute;
  bottom: 100px;
  left: 800px;
  z-index: 999;
  background-color: #333;


  animation-name: blockAnimation;
  animation-duration: 3s;
  animation-timing-function: linear;
}

#collisionBlock {
  position: absolute;
  width: 80px;
  height: 120px;
  position: absolute;
  bottom: 100px;
  left: 800px;
  z-index: 999;
  background-color: #333;


  animation-name: blockAnimation;
  animation-duration: 3s;
  animation-timing-function: linear;
}

@keyframes blockAnimation {
  0% {
    left: 800px;
  }

  100% {
    left: -100px;
  }
}

/* 障碍结束 */

/* 地面开始 */
#ground {
  width: 100%;
  height: 100px;
  position: absolute;
  bottom: 0;
  background-color: #aaa;
}

/* 地面结束 */

/* 开始遮罩开始 */
#startMask {
  position: absolute;
  width: 100%;
  line-height: 400px;
  text-align: center;
  font-size: 25px;
  font-weight: bold;
  color: #666;


}

.startMaskStay {
  animation-name: startMaskAnimation;
  animation-duration: 0.8s;
  animation-direction: alternate;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}

.startMaskLeave {
  animation-name: startMaskAnimationRunRight;
  animation-duration: 1.5s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

#startMask span {
  color: #67c23a;
}

@keyframes startMaskAnimation {
  0% {
    font-size: 25px;
  }

  100% {
    font-size: 30px;
  }
}

@keyframes startMaskAnimationRunRight {
  0% {
    left: 0px;
  }

  100% {
    left: 800px;
  }
}

/* 开始遮罩结束 */

/* 结束遮罩开始 */
#endMask {
  box-sizing: border-box;
  overflow: hidden;
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  padding: 20px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

#endMask p {
  font-size: 27px;
  font-weight: bold;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}

#endMask button {
  height: 40px;
  color: #fff;
  border: unset;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#endMask button {
  background-color: #ffa600;
}

#endMask button:hover {
  background-color: #fac156;
}

#endMask button:active {
  background-color: #ffa600;
}

.endMaskCome {
  animation-name: endMaskAnimationCome;
  animation-duration: 1s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}


@keyframes endMaskAnimationCome {
  100% {
    top: 40%;
  }
}

/* 结束遮罩结束 */